{*Smarty*}
<html>
<head>
  <title>Sign up!</title>
  <link rel="stylesheet" type="text/css" href="/default.css" />
</head>
<body>

{if $added}
  <div class="status">You have signed up! <a href="users">See other users</a>. </div> 
{elseif $failed}
  <div class="status">Something has gone wrong.. Try again! </div>
{/if}

<form method="post" action="/reg/signup">
  <div class="form">
    {foreach key=key item=field from=$user}
      <div class="field">
        <div class="key">{$field.label}: </div>
        <div class="value">
          {if $field.type == 'password'}
            <input type="password" name="{$key}" value="{$field.value}"/>
          {else}
            <input type="text" name="{$key}" value="{$field.value}"/>
          {/if}
        </div>
        <div class="error">{$field.error}</div>
      </div>
    {/foreach}
    
    <div class="field">
      <div class="key">
        <img src="/reg/captcha" alt="CAPTCHA image" />
      </div>
      <div class="value"></div>
    </div>
    
    <div class="field">
      <div class="key"></div>
      <div class="value"><input class="button" type="submit" value="Sign up!"/></div>
    </div>
  </div>
</form>

</body>
</html>